#include <stdio.h>
int main()
{
	int i = 0;
	int sum = 0;
	int n = 0;
	scanf_s("%d", &n);//vs2022 

	for (i = 1; i <= n; i++)
	{
		sum *= i;
	}
	printf("%d", sum);
	return 0;
}
